import { UserLayout, TabLayout, RouteView, BlankLayout, PageView } from '@/components/layouts'
import Home from '@views/Home'

/**
 * 走菜单，走权限控制
 * @type {[null,null]}
 */
export const asyncRouterMap = [

  // {
  //   path: '/',
  //   name: 'dashboard',
  //   component: TabLayout,
  //   meta: { title: '首页' },
  //   redirect: '/dashboard/analysis'
  // }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [

  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import( '@views/jobManage/Login')
  },
  {
    path: '/face',
    name: 'Face',
    component: () => import( '../components/face/Face')
  },
  {
    path: '/faceRegister',
    name: 'FaceRegister',
    component: () => import('../components/face/FaceRegister')
  },
  {
    path: '/toolbox',
    name: 'Toolbox',
    component: () => import( '@views/jobManage/Toolbox')
  },
  {
    path: '/newtoolbox',
    name: 'NewToolbox',
    component: () => import( '@views/jobManage/NewToolbox')
  },
  {
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
      },
      {
        path: 'register',
        name: 'register',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/register/Register')
      },
      {
        path: 'register-result',
        name: 'registerResult',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/register/RegisterResult')
      },
      {
        path: 'alteration',
        name: 'alteration',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/alteration/Alteration')
      },
      {
        path: '*',
        redirect: '/404'
      }
    ]
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@views/exception/404')
  }
]
